﻿@using Res = ViewRes.EntryEditStrings

<!-- binding context: EnglishTranslatedStringEditViewModel -->

@* Security note: live preview renders HTML but it's sanitized by the markdown processing library *@

<div>
	<h4 data-bind="visible: showTranslation">@Res.TranslatedStringOriginal</h4>
	<textarea rows="8" cols="70" class="edit-text" data-bind="textInput: original"></textarea>
	<div data-bind="markdown: original" class="edit-preview"></div>
	<p>
		<a href="#" class="textLink addLink" data-bind="visible: !showTranslation(), click: function() { showTranslation(true); }">
			@Res.TranslatedStringAddEnglishTranslation
		</a>
	</p>
</div>
<div data-bind="visible: showTranslation">
	<h4>@Res.TranslatedStringEnglishTranslation</h4>
	<textarea rows="8" cols="70" class="edit-text" data-bind="textInput: english"></textarea>
	<div data-bind="markdown: english" class="edit-preview"></div>
</div>

